﻿using System;
using System.Collections.Generic;

class TwoPositiveIntsAsArrays
{
    static void NumbersAsArraysOfDigits(string firstNumber, string secondNumber)
    {
        char[] firstArray = new char[firstNumber.Length];
        char[] secondArray = new char[secondNumber.Length];
        
        for (int index = 0; index < firstNumber.Length; index++)
        {
            firstArray[index] = firstNumber[index];
           
        }
        Array.Reverse(firstArray);
        Console.WriteLine();
        for (int i = 0; i < firstNumber.Length; i++)
        {
            Console.Write("{0,2}",firstArray[i]);
        }
       
        for (int index = 0; index < secondNumber.Length; index++)
        {
            secondArray[index] = secondNumber[index];
        }
        Array.Reverse(secondArray);
        Console.WriteLine();
        Console.WriteLine();
        for (int i = 0; i < secondNumber.Length; i++)
        {
            Console.Write("{0,2}",secondArray[i]);
        }
    }
    static void Main()
    {
        Console.WriteLine("enter first number (digits <= 10 000):");
        string firstnumber = Console.ReadLine();
        Console.WriteLine("enter second number (digits <= 10 000):");
        string secondnumber = Console.ReadLine();
        if (firstnumber.Length > 10000 || secondnumber.Length > 10000)
        {
            Console.WriteLine("The numbers must be with max length of 10 000 digits!");
        }
        else
        {
            NumbersAsArraysOfDigits(firstnumber, secondnumber);
        }
        
    }
}

